package com.tbit.uqbike.webmanager.controller;

import com.tbit.uqbike.object.pojo.PosLog;
import com.tbit.uqbike.object.view.JsonResult;
import com.tbit.uqbike.service.business.ReturnPosLogService;
import com.tbit.uqbike.webmanager.util.Assert;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Author: chen
 * @Description: 用户还车手机位置车辆位置
 * @Date: 创建于 14:52 2020/6/5
 */
@RestController
@RequestMapping("posLog")
public class ReturnPosLogController {
    @Autowired
    private ReturnPosLogService returnPosLogService;

    @RequestMapping("/queryPage")
    public JsonResult queryPage(String orderNO, String userCode, String machineNO, @RequestParam(defaultValue = "1") Integer mapType) {
        Assert.notNull(orderNO, "ver.orderNO.notnull");
        PosLog logs = returnPosLogService.queryPage(orderNO, userCode, machineNO, mapType);
        return JsonResult.ok(logs);
    }
}
